﻿
@{
    ViewBag.Title = "NewInfo";
    Layout = "~/Views/Shared/_Head.cshtml";
}
@model Gtkj.CMS.Model.NewInfo
           @{
               Gtkj.CMS.BLL.NewInfoService NewInfoService = new Gtkj.CMS.BLL.NewInfoService();
               var OnNewsInfo = NewInfoService.LoadEntities(x => x.NewId < Model.NewId).OrderByDescending(x => x.NewId).Take(1).FirstOrDefault();
               var UnderNewsInfo = NewInfoService.LoadEntities(x => x.NewId > Model.NewId).OrderBy(x => x.NewId).Take(1).FirstOrDefault();
           }
<div class="container">
    <!---->
    <div class="page"><a href="/Home/index">首页</a><span>&gt;</span><a href="/News/NewList">新闻资讯</a><span>&gt;</span><a href="/News/NewList?NewTypeID=@Model.TypeID&NewTypeName=@Model.NewType.TypeName">@Model.NewType.TypeName</a><span>&gt;</span><a href="javascript:void(0)">@Model.Title</a></div>
    <section class="clearfix">
        <div class="fl list_a">
            <div class="articel">
                <div class="articel_b"><h1>@Model.Title</h1><span>来源：@Model.Source</span></div>
                <div class="articel_c">
                    @(Html.Raw(Model.Conntenst))
                </div>
                <div class="articel_b">
                    <a href="@(OnNewsInfo==null?"javascript:void(0)":"/News/NewInfo?ID="+OnNewsInfo.NewId)">上一篇：@(OnNewsInfo==null?"没有了":OnNewsInfo.Title)</a>
                    <a href="@(UnderNewsInfo == null ? "javascript:void(0)" : "/News/NewInfo?ID=" + UnderNewsInfo.NewId)">下一篇：@(UnderNewsInfo == null ? "没有了" : UnderNewsInfo.Title)</a>
                </div>
            </div>
        </div>
        <div class="fl list_b">
            <h2>浏览排行</h2>
            <ul>
                @if (ViewBag.NewSorting != null)
                {
                    int i = 1;
                    foreach (Gtkj.CMS.Model.NewInfo item in ViewBag.NewSorting)
                    {
                        if (i <= 3)
                        {
                            <li><span class="list_b1">@i</span><a href="/News/NewInfo?ID=@item.NewId">@item.Title</a></li>
                        }
                        else
                        {
                            <li><span>@i</span><a href="/News/NewInfo?ID=@item.NewId">@item.Title</a></li>
                        }
                        i++;
                    }
                }
            </ul>
        </div>
    </section>
</div>
